using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class CannonLevelIcon : MonoBehaviour
{
    public GameObject[] cannonLevelIcon;
    CannonLevel e_cannonLevel;

    void Start()
    {
        GameObject[] cannonLevelIcon = GameObject.FindGameObjectsWithTag("CannonLevel");
        foreach(var child in cannonLevelIcon)
        {
            Debug.Log(child.name);
        }
    }

    void Update()
    {
        //ChangeCannonIcon();
        Test();
    }
    void ChangeCannonIcon()
    {
        switch (e_cannonLevel)
        {
            case CannonLevel.Weak:
                cannonLevelIcon[1].SetActive(false);
                cannonLevelIcon[2].SetActive(false);
                break;
            case CannonLevel.Normal:
                cannonLevelIcon[1].SetActive(true);
                cannonLevelIcon[2].SetActive(false);
                break;
            case CannonLevel.Strong:
                cannonLevelIcon[1].SetActive(true);
                cannonLevelIcon[2].SetActive(true);
                break;
        }
    }
    void Test()
    {
        if (Input.GetKeyDown(KeyCode.Q))
        {
            cannonLevelIcon[1].SetActive(false);
            cannonLevelIcon[2].SetActive(false);
        }
        if (Input.GetKeyDown(KeyCode.E))
        {
            cannonLevelIcon[1].SetActive(true);
            cannonLevelIcon[2].SetActive(true);
        }
    }
}
